package org.jeecg.modules.yw.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.jeecg.common.aspect.annotation.Dict;

import java.util.Date;

@NoArgsConstructor
@AllArgsConstructor
@Data
@TableName("articles")
public class Article {
    @TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "主键ID")
    private String id; // 主键id

    @ApiModelProperty(value = "文章标题")
    private String title; // 文章标题

    @ApiModelProperty(value = "所属分类")
    @Dict(dictTable ="categories",dicText = "name",dicCode = "id")
    private String category; // 所属分类

    @ApiModelProperty(value = "文章内容")
    private String content; // 文章内容

    @ApiModelProperty(value = "创建人")
    private String creator; // 创建人

    @ApiModelProperty(value = "创建时间")
    private Date createtime; // 创建时间
}
